package research.ui.editors.listeners;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.widgets.Text;

import research.ui.editors.EntityEditor;

public class NameModifyListener extends TextModifyListener {
	
	public NameModifyListener(EntityEditor editor) {
		super(editor);
	}

	@Override
	public void modifyText(ModifyEvent e) {
		super.modifyText(e);
		if (e.widget instanceof Text) {
			Text name = (Text) e.widget;
			editor.updateFormTitle(name.getText());
		}
	}

}
